module Tomahawk
  module Generators    
    class HTTPd < Base

      def initialize(httpd)
        @httpd = httpd
      end

      def to_str
        config = ''

        @httpd.directives.each do |directive, value|
          config += generate_directive(directive, value) 
        end

        @httpd.groups.each do |group|
          config += group.to_s
        end

        config
      end
      alias_method :to_s, :to_str
    end
  end
end